Skip to content

Enable multithreaded compilation for ps2EntryRunner with MSVC /MP flag#84

Open
PlasteredCrab wants to merge 1 commit intoran-j:mainfrom
PlasteredCrab:feature/ps2entryrunner-multithreading
Open

Enable multithreaded compilation for ps2EntryRunner with MSVC /MP flag#84
PlasteredCrab wants to merge 1 commit intoran-j:mainfrom
PlasteredCrab:feature/ps2entryrunner-multithreading

Conversation

@PlasteredCrab
Copy link

Add Multithreading for Building with /MP flag.
Tested this and it builds much faster

@ej-sanmartin
Copy link
Contributor

I'd suggest using /MP4 flag to limit number of processes. At least in weaker machines like what I use, /MP (which uses all available processes) and other similar flags is too resource intensive and will block other unrelated OS operations causing freezing

@PlasteredCrab PlasteredCrab force-pushed the feature/ps2entryrunner-multithreading branch from 8cd6475 to 60e214f Compare February 25, 2026 18:25

if(MSVC)
target_compile_options(ps2EntryRunner PRIVATE /FS)
target_compile_options(ps2EntryRunner PRIVATE /FS /MP4)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok we have 2 problems here.

First is a hardcode 4. My pc has like 12 cores so using 4 will be ass for me.

You are only applying this to msvc but a lot of people use other compilers

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry Edgar told me 4 would be better for weaker PCs haha. A command argument to specify the amount of cores or max cores was suggested as well which we could do instead!

@ran-j
Copy link
Owner

ran-j commented Feb 27, 2026

I think this is more of personal usage but ok. I will merge @PlasteredCrab just move the flag to be applied to all.compilers not only msvc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants